Skip to content

docs: consolidate to user-facing guide only (removes duplicates and legacy flat docs)#1029

Open
FlorianBruniaux wants to merge 10 commits intodevelopfrom
feat/refac-doc
Open

docs: consolidate to user-facing guide only (removes duplicates and legacy flat docs)#1029
FlorianBruniaux wants to merge 10 commits intodevelopfrom
feat/refac-doc

Conversation

@FlorianBruniaux
Copy link
Copy Markdown
Collaborator

@FlorianBruniaux FlorianBruniaux commented Apr 4, 2026

What

Restructures docs/ to contain only user-facing website content, following the distributed documentation pattern from PR #869.

Before: 39 files across 3 tabs (guide/reference/architecture) — duplicates of codebase docs + command pages showing rtk <cmd> syntax users never type.

After: 9 files in a single docs/guide/ tab. Zero legacy flat docs. Zero duplicates.

Why

Two root problems identified in review:

  1. reference/ and architecture/ duplicated ARCHITECTURE.md, CONTRIBUTING.md, src/*/README.md (distributed, co-located pattern from PR fix(refacto-codebase): technical docs & sub folders #869)
  2. Command pages showed rtk git status, rtk cargo test etc. — syntax users never type because hooks rewrite transparently

Going deeper: the 6 legacy flat docs (FEATURES.md, TECHNICAL.md etc.) already duplicated the codebase. The 39 new files were a 3rd layer on top of that. This PR collapses all three into one clean structure.

Final structure

docs/
├── README.md                       # Interface contract
└── guide/
    ├── index.md
    ├── getting-started/
    │   ├── installation.md
    │   ├── quick-start.md          # Hook transparency framing, no rtk <cmd>
    │   └── supported-agents.md
    ├── what-rtk-covers.md          # 60+ commands, savings % by ecosystem, no rtk prefix
    ├── analytics/
    │   └── gain.md                 # rtk gain full reference + advanced workflows
    ├── configuration.md
    └── troubleshooting.md

Where the removed content lives

Removed Source of truth
docs/reference/contributing/ CONTRIBUTING.md, SECURITY.md
docs/reference/internals/ ARCHITECTURE.md, src/*/README.md
docs/architecture/ ARCHITECTURE.md ADR section
docs/guide/commands/ (12 pages) what-rtk-covers.md (reframed without rtk prefix)
docs/FEATURES.md (FR, 1400 lines) what-rtk-covers.md (EN)
docs/TECHNICAL.md ARCHITECTURE.md + src/*/README.md
docs/TROUBLESHOOTING.md guide/troubleshooting.md
docs/AUDIT_GUIDE.md guide/analytics/gain.md (enriched with CI/cron workflows)
docs/tracking.md (Rust API) src/core/README.md (already covers schema + contracts)
docs/filter-workflow.md (Mermaid) src/filters/README.md (diagrams added in this PR)

Test plan

  • cargo test: 1253 passed, 0 failures
  • No rtk git / rtk cargo / rtk tsc etc. in docs/guide/ (only rtk gain, rtk init, rtk verify, rtk proxy which are user-typed commands)
  • All 9 guide files have valid YAML frontmatter
  • src/filters/README.md now includes build pipeline + filter lookup Mermaid diagrams

Generated with Claude Code

aeppling and others added 9 commits March 30, 2026 15:13
fix(refacto-codebase): technical docs & sub folders
…-components--rtk

chore(master): release 0.34.2
fix(refacto): wrappers for standardization, exit codes lexer tokenizer, constants, code clean
…-components--rtk

chore(master): release 0.34.3
Creates docs/README.md (interface contract defining 3-tab structure,
required frontmatter, and conventions) and 4 stub pages with valid
frontmatter for docs/guide/, docs/reference/, and docs/architecture/.
These are the prerequisites for the prepare-docs.mjs pipeline (Plan B)
and for Adrien's Phase 1 content work.

No existing files modified.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Signed-off-by: Florian BRUNIAUX <[email protected]>
Creates the complete user-facing guide for the docs website:

Getting started:
- quick-start.md: 5-minute walkthrough (init, first commands, rtk gain)
- supported-agents.md: Claude Code, Cursor, Copilot, Gemini, Cline, Windsurf,
  Codex, OpenCode — integration tiers, install commands, graceful degradation

Commands (adapted from FEATURES.md, English, --help-first format):
- git.md: status/log/diff/show/add/commit/push/pull/branch + gh CLI
- cargo.md: test/nextest/build/check/clippy/install + generic test/err wrappers
- files.md: ls/read/grep/find/diff/wc/smart with before/after examples
- javascript.md: vitest/playwright/tsc/eslint/prettier/next/pnpm/npm/npx/prisma
- python.md: pytest/ruff/mypy/pip/deps

Reference:
- filters/using-filters.md: 8-stage pipeline, lookup priority, TOML DSL reference,
  Mermaid diagram (adapted from docs/filter-workflow.md)
- analytics/gain.md: rtk gain flags, daily/weekly/monthly breakdowns, export
  formats, token estimation, database management (from docs/AUDIT_GUIDE.md)
- configuration.md: full config.toml reference, env vars, tee system, telemetry
- troubleshooting.md: common issues and fixes (from docs/TROUBLESHOOTING.md)

All pages carry valid frontmatter (title, description, sidebar.order).
No existing files modified.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Signed-off-by: Florian BRUNIAUX <[email protected]>
…mmands

Guide — 10 new command and analytics pages:
- commands/go.md: go test (NDJSON), golangci-lint
- commands/ruby.md: rspec, rubocop, rake
- commands/dotnet.md: dotnet build/test, binlog, format
- commands/containers.md: docker ps/images/logs/compose, kubectl pods/services/logs
- commands/github-cli.md: gh pr/issue/run, Graphite gt commands
- commands/data.md: json, env, log, curl, wget, aws, psql, summary
- commands/utilities.md: proxy passthrough, global flags, RTK_DISABLED
- filters/creating-filters.md: TOML DSL guide, field reference, inline tests
- analytics/discover.md: rtk discover — missed savings analysis
- analytics/economics.md: rtk cc-economics — dollar savings vs ccusage

Reference tab (9 pages):
- contributing/guide.md: design philosophy, PR process, TOML vs Rust decision
- contributing/security.md: vulnerability reporting, dangerous patterns, dep criteria
- contributing/coding-standards.md: Rust rules, error handling, lazy_static, fallback pattern
- contributing/testing.md: snapshot tests, token accuracy, cross-platform, benchmarks
- internals/command-routing.md: 6-phase lifecycle, exit codes, verbosity, module map
- internals/filter-pipeline.md: 12 filtering strategies, TOML stages, savings by ecosystem
- internals/tracking-system.md: SQLite schema, data flow, token estimation, Tracker API
- internals/hook-engine.md: rewrite registry, compound commands, exit code contract, rtk init
- toml-dsl/specification.md: complete field reference, pipeline order, build compilation

Architecture tab (4 pages):
- diagrams/command-flow.md: end-to-end Mermaid — hook → RTK → LLM
- diagrams/filter-pipeline.md: build pipeline + 8-stage runtime Mermaid
- decisions/why-no-async.md: ADR — single-threaded, <10ms startup constraint
- decisions/proxy-architecture.md: ADR — why CLI proxy over aliases/LD_PRELOAD/hooks-only

All pages carry valid frontmatter (title, description, sidebar.order).
No existing files modified.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Signed-off-by: Florian BRUNIAUX <[email protected]>
Copilot AI review requested due to automatic review settings April 4, 2026 22:24
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 4, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

✅ FlorianBruniaux
✅ aeppling
❌ github-actions[bot]
You have signed the CLA already but the status is still pending? Let us recheck it.

@FlorianBruniaux
Copy link
Copy Markdown
Collaborator Author

FlorianBruniaux commented Apr 4, 2026

i18n docs — two options, need input

Before this merges, worth aligning on how we handle multi-language docs down the road. The current structure is EN-only (explicit decision in Plan B), but the question is whether we set it up to be migration-friendly.

Option A — locale subdirectory at docs/ root

docs/
  en/         ← current content moved here
    guide/
    reference/
    architecture/
  fr/
    guide/
    ...

prepare-docs.mjs copies docs/en/ as the root locale (keeps /docs/guide/git URLs for EN) and docs/fr/ as /fr/docs/guide/git. Starlight handles this natively.

Upside: clean, native Starlight i18n, no URL changes for EN.
Downside: requires moving all current files under docs/en/ — easy one-liner (git mv) but has to happen before content work piles up.

Option B — EN-only in repo, translations externalized

docs/         ← EN only, current structure unchanged

Translations live on Crowdin/Weblate or a separate repo. prepare-docs.mjs injects them at build time. Community translates on the platform, not via Rust PRs.

Upside: zero impact on current structure, zero maintenance burden until there's actual demand.
Downside: external dependency, slightly more build pipeline complexity when we do add a language.

My take: Option B now, Option A when a specific language has contributors ready to maintain it. Migration is a one-liner at that point. No reason to restructure prematurely.

@pszymkowiak @aeppling — what's your preference? If you want Option A, better to decide before Adrien starts filling in content so we're not doing a mass rename mid-sprint.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new structured documentation layout under docs/ intended for consumption by the rtk-ai/rtk-website pipeline (Guide / Reference / Architecture), and also includes release/version metadata updates.

Changes:

  • Add a large set of new docs pages with required frontmatter, organized into docs/guide/, docs/reference/, and docs/architecture/.
  • Add diagrams (Mermaid) and ADR-style architecture decision pages.
  • Update release/version files (CHANGELOG.md, Cargo.toml, Cargo.lock, .release-please-manifest.json).

Reviewed changes

Copilot reviewed 42 out of 43 changed files in this pull request and generated 20 comments.

Show a summary per file
File Description
docs/README.md Defines the 3-tab docs structure and frontmatter/linking contract.
docs/guide/index.md Guide landing page linking to key user-facing sections.
docs/guide/getting-started/installation.md Installation + verification instructions.
docs/guide/getting-started/quick-start.md 5-minute walkthrough for initial usage.
docs/guide/getting-started/supported-agents.md Lists supported agents and integration tiers.
docs/guide/configuration.md User-facing config and env var reference.
docs/guide/troubleshooting.md Common issues and fixes.
docs/guide/filters/using-filters.md Explains TOML filters, lookup order, and pipeline (contains schema details).
docs/guide/filters/creating-filters.md Walkthrough for writing project-local TOML filters.
docs/guide/commands/git.md Git command behavior and savings examples.
docs/guide/commands/cargo.md Cargo command behavior and wrappers.
docs/guide/commands/files.md Filesystem/search command behaviors.
docs/guide/commands/javascript.md JS/TS ecosystem commands and examples.
docs/guide/commands/python.md Python ecosystem commands and examples.
docs/guide/commands/go.md Go ecosystem commands and examples.
docs/guide/commands/ruby.md Ruby ecosystem commands and examples.
docs/guide/commands/dotnet.md .NET ecosystem commands and examples.
docs/guide/commands/containers.md Docker/Kubernetes command behaviors.
docs/guide/commands/data.md JSON/env/log/curl/wget/aws/psql/summary commands.
docs/guide/commands/github-cli.md gh/gt behaviors and examples.
docs/guide/commands/utilities.md Proxy passthrough + global flags.
docs/guide/analytics/gain.md rtk gain usage and data model explanation.
docs/guide/analytics/discover.md rtk discover usage and output explanation.
docs/guide/analytics/economics.md rtk cc-economics usage explanation.
docs/reference/index.md Reference tab landing page.
docs/reference/contributing/guide.md Contributor guide distilled for the docs site.
docs/reference/contributing/security.md Security policy + dangerous patterns guidance.
docs/reference/contributing/coding-standards.md RTK-specific Rust coding standards.
docs/reference/contributing/testing.md Testing approaches (insta, savings checks, perf).
docs/reference/internals/command-routing.md High-level routing lifecycle explanation.
docs/reference/internals/filter-pipeline.md Overview of filter strategies + TOML pipeline.
docs/reference/internals/tracking-system.md SQLite tracking system explanation (schema/paths/etc.).
docs/reference/internals/hook-engine.md Hook/rewrite architecture and contracts.
docs/reference/toml-dsl/specification.md TOML DSL “specification” reference page.
docs/architecture/index.md Architecture tab landing page.
docs/architecture/diagrams/command-flow.md Mermaid diagram for end-to-end command flow.
docs/architecture/diagrams/filter-pipeline.md Mermaid diagram for TOML filter build/runtime pipeline.
docs/architecture/decisions/why-no-async.md ADR documenting “no async runtime” rationale.
docs/architecture/decisions/proxy-architecture.md ADR documenting the CLI proxy pattern decision.
CHANGELOG.md Adds release entries for 0.34.2 and 0.34.3.
Cargo.toml Bumps crate version to 0.34.3.
Cargo.lock Updates locked package version to 0.34.3.
.release-please-manifest.json Updates release-please tracked version to 0.34.3.

Comment on lines +51 to +55
[[filters]]
name = "my-tool"
match_command = "^my-tool\\b"

strip_lines = [
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TOML example uses [[filters]] with a name field and strip_lines, but RTK's TOML engine expects schema_version = 1 at the top and filter definitions under [filters.<filter-name>] with fields like strip_lines_matching / keep_lines_matching (see src/core/toml_filter.rs). As written, this example will fail to parse and the filter will be ignored.

Suggested change
[[filters]]
name = "my-tool"
match_command = "^my-tool\\b"
strip_lines = [
schema_version = 1
[filters.my-tool]
match_command = "^my-tool\\b"
strip_lines_matching = [

Copilot uses AI. Check for mistakes.
S1["1. strip_ansi"] --> S2
S2["2. replace"] --> S3
S3{"3. match_output\nshort-circuit?"}
S3 -->|"✅ match"| MSG[["emit on_match\nstop"]]
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the runtime pipeline diagram, match_output is shown emitting on_match, but the TOML schema uses match_output = [{ pattern, message, unless? }] and there is no on_match field (see src/core/toml_filter.rs). The diagram should reference the rule’s message instead.

Suggested change
S3 -->|"✅ match"| MSG[["emit on_match\nstop"]]
S3 -->|"✅ match"| MSG[["emit rule message\nstop"]]

Copilot uses AI. Check for mistakes.
Comment on lines +14 to +18
**Storage locations:**
- Linux: `~/.local/share/rtk/tracking.db`
- macOS: `~/Library/Application Support/rtk/tracking.db`
- Windows: `%APPDATA%\rtk\tracking.db`

Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The DB filename/location here doesn’t match the current implementation: the tracker uses dirs::data_local_dir()/rtk/history.db by default (not tracking.db), and on Windows it’s under LocalAppData (not %APPDATA%). Please update the paths to match src/core/tracking.rs (HISTORY_DB = "history.db").

Copilot uses AI. Check for mistakes.
Comment on lines +69 to +73
```
estimate_tokens(text) = text.len() / 4
```

~4 characters per token average. Accuracy: ±10% vs actual LLM tokenization.
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Token estimation is described as text.len() / 4, but the implementation uses ceil(chars/4) (so 1–4 chars still counts as 1 token) in estimate_tokens (src/core/tracking.rs). Please update the formula here to avoid confusion when validating numbers.

Copilot uses AI. Check for mistakes.
Comment on lines 1 to 4
[package]
name = "rtk"
version = "0.34.1"
version = "0.34.3"
edition = "2021"
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description says “No existing files were modified” and “All changes are additive”, but this PR changes the crate version (and also updates CHANGELOG/Cargo.lock/release manifest). If the version bump is intentional, please update the PR description; otherwise, consider dropping these release/version changes from this docs-only PR.

Copilot uses AI. Check for mistakes.
Comment on lines +25 to +29
[tracking]
enabled = true # enable/disable token tracking
history_days = 90 # retention in days (auto-cleanup)
database_path = "/custom/path/tracking.db" # optional override

Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs imply tracking.history_days controls retention, but Tracker::cleanup_old() uses DEFAULT_HISTORY_DAYS and doesn’t read config (src/core/tracking.rs). Consider clarifying this (or implementing config-driven retention) so the config docs match runtime behavior.

Copilot uses AI. Check for mistakes.

| Variable | Description |
|----------|-------------|
| `RTK_DISABLED=1` | Disable RTK for a single command (`RTK_DISABLED=1 git status`) |
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The env var table is missing RTK_DB_PATH, which overrides the tracking DB location with highest priority (src/core/tracking.rs). Adding it here would make configuration docs complete.

Suggested change
| `RTK_DISABLED=1` | Disable RTK for a single command (`RTK_DISABLED=1 git status`) |
| `RTK_DISABLED=1` | Disable RTK for a single command (`RTK_DISABLED=1 git status`) |
| `RTK_DB_PATH` | Override the tracking database path |

Copilot uses AI. Check for mistakes.
Comment on lines +89 to +92
ELSE 0 END
),
exec_time_ms INTEGER
);
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This schema omits columns that RTK adds via migrations (exec_time_ms and project_path) and also has timestamp populated by RTK (not a DEFAULT). Please update the schema snippet to reflect the actual CREATE TABLE + migrations in src/core/tracking.rs so readers can query the DB correctly.

Copilot uses AI. Check for mistakes.
Comment on lines +118 to +120
## Thread safety

Single-threaded execution with `Mutex<Option<Tracker>>` for future-proofing. No multi-threading currently used.
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The “Thread safety” note mentions Mutex<Option<Tracker>>, but the current implementation doesn’t use that pattern (it opens connections via Tracker::new() and relies on WAL + busy_timeout for concurrent access). Please update this section to match src/core/tracking.rs.

Copilot uses AI. Check for mistakes.
Comment on lines +49 to +52
| `keep_lines_matching` | regex[] | no | Keep only lines matching at least one pattern |
| `replace` | array | no | Regex substitutions: `{ pattern, replacement }` |
| `match_output` | array | no | Short-circuit rules: `{ pattern, message }` |
| `truncate_lines_at` | int | no | Truncate lines longer than N characters |
Copy link

Copilot AI Apr 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

match_output rules also support an optional unless regex to prevent short-circuiting when errors/warnings are present (see MatchOutputRule in src/core/toml_filter.rs). Documenting unless here would make the spec complete.

Copilot uses AI. Check for mistakes.
@aeppling
Copy link
Copy Markdown
Contributor

aeppling commented Apr 5, 2026

Hey,

Thanks for the documentation rework, since PR #869 we already had the technical documentation , this is maintained in each respective folder per responsability, to ensure easy collaboration and work in specific areas.

We need a clean separation between user documentation : Usage, How to use, How to configure, and so on....
-> online doc

And the technical documentation: How to contribute, Flow Diagrams, Edge case, Engine
-> can be in the codebase in respective areas

This is to keep things simple for users, we do not want noise in those documentation.

Current RTK technical doc implementation

The documentation follows a distributed, co-located pattern - each folder contains a README explaining its purpose:

Root Level Documentation

https://github.com/rtk-ai/rtk/blob/main/docs/contributing/ARCHITECTURE.md (42K)
https://github.com/rtk-ai/rtk/blob/main/CONTRIBUTING.md (12K)
https://github.com/rtk-ai/rtk/blob/main/SECURITY.md (7K)
https://github.com/rtk-ai/rtk/blob/main/docs/TECHNICAL.md (20K) - Created in PR #869

Components level Documentation

https://github.com/rtk-ai/rtk/blob/main/src/core/README.md
https://github.com/rtk-ai/rtk/blob/main/src/hooks/README.md
https://github.com/rtk-ai/rtk/blob/main/src/cmds/README.md
... and so on

Ecosystem-specific READMEs:

https://github.com/rtk-ai/rtk/tree/main/src/cmds/git - Git ecosystem filters
https://github.com/rtk-ai/rtk/tree/main/src/cmds/rust - Rust filters
https://github.com/rtk-ai/rtk/tree/main/src/cmds/js - JavaScript/TypeScript filters
... and so on

Full review

Core Problems

  1. Shows command syntax users never use - Your docs show rtk git status, rtk cargo test, etc. Users don't type these.
  2. Includes code examples
  3. Duplicates existing technical documentation - All technical docs already exist

@FlorianBruniaux
Copy link
Copy Markdown
Collaborator Author

Thanks for the detailed review — the points are valid, taking them seriously.

What you're right about

The reference/ and architecture/ tabs are straight duplicates of what already lives in the codebase (ARCHITECTURE.md, CONTRIBUTING.md, SECURITY.md, component READMEs). No reason to maintain two copies. Those should be cut entirely.

The commands pages showing rtk git status, rtk cargo test, etc. as user-facing commands is wrong. Users don't type those — the hook handles it transparently. Showing that syntax in user docs adds noise and implies a manual workflow that doesn't exist in practice.

What this PR should actually be

User-facing only, minimal scope:

  • getting-started/ — install, verify, hook setup per agent
  • supported-agents.md — which agents work, how to enable each
  • configuration.mdconfig.toml options, env vars, how to exclude commands
  • analytics/gain.md — how to read your savings dashboard
  • troubleshooting.md — common issues and fixes

For the "what does RTK optimize" question: a single page listing ecosystems and savings metrics (no rtk <cmd> syntax, just "git operations: 75-92% savings") is probably enough. Or skip it entirely and let the README handle that.

Proposed next steps

  1. Drop docs/reference/ and docs/architecture/ — already covered in codebase
  2. Rewrite docs/guide/commands/ as a single savings reference page (no CLI syntax) or remove it
  3. Keep the 5 user-facing pages above

Does this align with what you had in mind? Happy to rework the PR scope before Adrien starts on content.

@adrien-epling — also curious what you'd actually want as a user landing on the docs for the first time.

…flat docs

- Remove docs/reference/ (10 files): duplicates CONTRIBUTING.md, SECURITY.md,
  ARCHITECTURE.md, src/*/README.md (distributed pattern from PR #869)
- Remove docs/architecture/ (5 files): duplicates ARCHITECTURE.md ADRs and diagrams
- Remove docs/guide/commands/ (12 files): showed rtk <cmd> syntax users never type
  (hooks rewrite transparently); content was derived from FEATURES.md
- Remove docs/guide/filters/ (2 files): contributor content, belongs with src/filters/
- Remove docs/guide/analytics/discover.md, economics.md: implementation details
- Remove legacy flat docs/ (6 files): FEATURES.md (FR), TECHNICAL.md, TROUBLESHOOTING.md,
  AUDIT_GUIDE.md, tracking.md, filter-workflow.md — all superseded by guide/ rewrites
  or codebase distributed docs

- Add docs/guide/what-rtk-covers.md: replaces 12 command pages with one user-facing
  overview of 60+ commands by ecosystem, no rtk <cmd> syntax
- Enrich docs/guide/analytics/gain.md: absorb advanced workflows from AUDIT_GUIDE.md
  (CI integration, pandas analysis, cron snapshots)
- Adapt docs/guide/getting-started/quick-start.md: remove rtk <cmd> examples,
  explain hook transparency instead
- Update docs/README.md: single-tab contract, pointer to codebase for technical docs
- Update docs/guide/index.md: clean navigation matching final structure
- Add Mermaid diagrams to src/filters/README.md: build pipeline + filter lookup
  (preserves content from filter-workflow.md in its natural home)

Result: 9 files in docs/guide/ (was 39), zero legacy flat docs, zero duplicates.
Codebase distributed docs (ARCHITECTURE.md, CONTRIBUTING.md, src/*/README.md)
remain the source of truth for technical and contributor content.

Signed-off-by: Florian BRUNIAUX <[email protected]>
@FlorianBruniaux FlorianBruniaux changed the title docs: reorganize RTK documentation into 3-tab structure (guide/reference/architecture) docs: consolidate to user-facing guide only (removes duplicates and legacy flat docs) Apr 5, 2026
@FlorianBruniaux
Copy link
Copy Markdown
Collaborator Author

Hey Patrick, thanks for the thorough review — you were right on both counts.

What changed in this revision:

The original PR had two fundamental problems: reference/ and architecture/ duplicated what already lives in the codebase (ARCHITECTURE.md, CONTRIBUTING.md, src/*/README.md), and the command pages showed rtk git status / rtk cargo test syntax that users never actually type.

Going deeper into the audit, the 6 legacy flat docs (FEATURES.md, TECHNICAL.md, etc.) were also already duplicating the codebase. The 39 new files were a 3rd layer on top of that. So we collapsed all three layers.

Result: 9 files instead of 39, all user-facing.

docs/
├── README.md                    # Interface contract (single-tab, pointer to codebase for technical docs)
└── guide/
    ├── getting-started/
    │   ├── installation.md
    │   ├── quick-start.md       # Explains hook transparency — no rtk <cmd> syntax
    │   └── supported-agents.md
    ├── what-rtk-covers.md       # 60+ commands by ecosystem, savings %, no rtk prefix
    ├── analytics/gain.md        # rtk gain reference + CI/cron workflows
    ├── configuration.md
    └── troubleshooting.md

Where the removed content lives:

Removed from docs/ Lives in
reference/contributing/ CONTRIBUTING.md, SECURITY.md
reference/internals/ ARCHITECTURE.md, src/*/README.md
architecture/ ARCHITECTURE.md ADR section
guide/commands/ (12 pages) what-rtk-covers.md (reframed — no rtk prefix)
FEATURES.md (FR, 1400 lines) what-rtk-covers.md (EN)
TECHNICAL.md ARCHITECTURE.md + src/*/README.md
TROUBLESHOOTING.md guide/troubleshooting.md
AUDIT_GUIDE.md guide/analytics/gain.md (enriched)
tracking.md (Rust API) src/core/README.md
filter-workflow.md (Mermaid) src/filters/README.md (diagrams added there)

The codebase distributed docs stay as the source of truth for contributor and technical content. docs/ is now strictly website-facing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants